[index]

Acceleration Property

Syntax

set the acceleration of [leg <number> of]
<path> to <x, y> Applies to paths, legs of paths

Description

By default, an object maintains a constant speed for the duration of its trip down a path or a leg of a path. Using the acceleration property, you can specify the duration of the path during which an object accelerates and decelerates (or slows down). The acceleration property requires two values, separated by a comma. The first value specifies the percent of the path duration during which the object accelerates; the second specifies the percent of path duration during which the object decelerates. You can specify continual acceleration by setting the acceleration property to "100,0" so that the object accelerates for 100% of the path and decelerates for none of it; similarly, you can specify continual deceleration by setting the property to "0,100". You can set the acceleration property for either an entire path or for each individual leg of a path. If you wish to set the acceleration property for each leg, you must set the playStyle property to useLegTiming to put your leg settings into effect.

Notes

If you decide to set the acceleration property for each leg of a path, first add all the legs you want to include, and then set the playStyle property to a value of useLegTiming. This simultaneously updates the playDuration property of the path.

Examples

on mouseUp animate shape 1 along path 1 end mouseUp Type the following into the Message Box: set the acceleration of path 1 to 100,0 Press the "Mover" button and observe the shape object move along the path you specified. Now add a leg to your path by entering part mode and clicking the "add leg" tool; then set the playStyle property to useLegTiming by clicking on the "useLegTiming" tool, and type the following into the Message Box: set the acceleration of leg 1 of path 1 to 100,0 set the acceleration of leg 2 of path 1 to 50,50 Click on the "Mover" button and watch your shape object move at different speeds along the two legs that now make up your path.
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.